// t2sg.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"


struct Node {
	Node *parent;

	Matrix transform;

	virtual void Draw(Graphics *g) = 0;
	virtual const Rectangle& GetBounds() = 0;
	virtual bool HitTest(const Point& p) = 0;

	virtual bool HitTestBounds(Point& p);

/*	static vector<int> ListPointRefs();

	void UpdatePoint(int ref);
	const Point& GetPoint(int ref); */


};

struct IPoint {
	virtual const Point& GetPoint() = 0;
};

struct AbsPoint : IPoint {
	const Point& GetPoint();
};

// represents a point in reference to some object. for example it could
// represent the center point of a circle in which case base refers to a Circle
// instance and ref holds a value like CirclePoint::Center
struct RefPoint : IPoint {
	Node *base;
	int ref;

	const Point& GetPoint();
};

// for things such as "a point on a wall distant x from the start point"
struct RelPoint : IPoint {
	Matrix transform;
	const Point& GetPoint();
};

// these are pointers because sometimes walls can share vertices
struct Wall {
	Point *start;
	Point *end;
};

struct Joist {
	RelPoint *start;
	RelPoint *end;
};

struct Dimension {
	RefPoint *start;
	RefPoint *end;
};

struct Layer {
	vector<Node*> entities;
};

struct Drawing {
	vector<Layer*> layers;
};

int _tmain(int argc, _TCHAR* argv[])
{
	return 0;
}

